home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19970626-19970929
/
000004_news@newsmaster….columbia.edu _Tue Jul 1 12:51:23 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA07934
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 1 Jul 1997 12:51:23 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id MAA22073
for kermit.misc@watsun; Tue, 1 Jul 1997 12:51:23 -0400 (EDT)
Path: news.columbia.edu!watsun.cc.columbia.edu!jaltman
From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: syncronization client an server times
Date: 1 Jul 1997 16:51:20 GMT
Organization: Columbia University
Lines: 59
Message-ID: <5pbci8$lhn$1@newsmaster.cc.columbia.edu>
References: <01bc8622$6a7cb8e0$9301dec3@roger.data.ee>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:7248
In article <01bc8622$6a7cb8e0$9301dec3@roger.data.ee>,
Anton Klevtsov <anton@data.ee> wrote:
: hey all!
: mayby someone knows how to sychronize times.
: problem is following:
: when I start my client (kermit for win95), first I have to receive time
: from servet and set this time in client. so, how can i do that?
With Kermit-95 this is easy. Kermit-95 supports host based time/date
assignments within various terminal emulations.
/************************************************************************
This program queries the system clock and issues a VT series
time.
VT CSI hr ; mm , p
The Wyse and Televideo sequences are as follows:
WY ESC c 8 hr mm
TVI ESC SP 1 ampm hr min
************************************************************************/
#include <time.h>
#include <stdio.h>
int main()
{
struct tm *newtime;
time_t ltime;
printf("Setting VT terminal clock ...\n");
time(<ime);
newtime = localtime(<ime);
printf("Time now: %d:%.2d:%.2d\n",newtime->tm_hour,
newtime->tm_min,newtime->tm_sec);
if ( newtime->tm_sec != 0 ) {
sleep( 60 - newtime->tm_sec ) ;
newtime->tm_min += 1 ;
}
printf("%c[%d;%d,p",27,newtime->tm_hour,newtime->tm_min);
printf("Time set to %d:%.2d:00\n",newtime->tm_hour,newtime->tm_min);
return 0;
}
Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
The Kermit Project * Columbia University
612 West 115th St #716 * New York, NY * 10025 * (212) 854-1344
http://www.columbia.edu/kermit/k95.html * kermit-support@columbia.edu